package com.zr.model;
// Generated 2016-6-19 19:35:13 by Hibernate Tools 3.2.2.GA

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TPay generated by hbm2java
 */
@Entity
@Table(name = "t_pay", catalog = "ld_sys")
public class TPay implements java.io.Serializable {

	private Integer pid;
	private String pname;
	private Set<TOrder> TOrders = new HashSet<TOrder>();

	public TPay() {
	}

	public TPay(String pname, Set<TOrder> TOrders) {
		this.pname = pname;
		this.TOrders = TOrders;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "pid", unique = true, nullable = false)
	public Integer getPid() {
		return this.pid;
	}

	public void setPid(Integer pid) {
		this.pid = pid;
	}

	@Column(name = "pname")
	public String getPname() {
		return this.pname;
	}

	public void setPname(String pname) {
		this.pname = pname;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "TPay")
	public Set<TOrder> getTOrders() {
		return this.TOrders;
	}

	public void setTOrders(Set<TOrder> TOrders) {
		this.TOrders = TOrders;
	}

}
